#include "module_app_interface.h"
#include "module_app_menu.h"

void app_im_init_obj(lv_obj_t *obj, uint8_t bg_opa, uint32_t bg_color)
{
	lv_obj_set_style_pad_all(obj, 0, 0);
	lv_obj_set_style_pad_gap(obj, 0, 0);
	lv_obj_set_style_border_width(obj, 0, 0);
	lv_obj_set_style_outline_width(obj, 0, 0);
	lv_obj_set_style_bg_opa(obj, bg_opa, 0);
	lv_obj_set_style_bg_color(obj, lv_color_hex(bg_color), 0);
	lv_obj_set_scrollbar_mode(obj, LV_SCROLLBAR_MODE_OFF);
	lv_obj_set_style_radius(obj, 0, 0);
}

lv_obj_t *app_interface_management_create_page_parent_cont(lv_obj_t *parent)
{
	lv_obj_t *cont = lv_obj_create(parent);
	lv_obj_set_size(cont, lv_disp_get_hor_res(NULL), lv_disp_get_ver_res(NULL));
	lv_obj_set_pos(cont, lv_dpx(0), lv_dpx(0));
	lv_obj_set_style_pad_all(cont, lv_dpx(0), 0);
	lv_obj_set_style_bg_color(cont, lv_color_hex(DESKTOP_COLOR), 0);
	lv_obj_set_style_bg_opa(cont, LV_OPA_COVER, 0);
	lv_obj_set_style_border_opa(cont, LV_OPA_TRANSP, 0);
	lv_obj_set_style_border_width(cont, lv_dpx(0), 0);
	lv_obj_clear_flag(cont, LV_OBJ_FLAG_SCROLLABLE);
	lv_obj_clear_flag(cont, LV_OBJ_FLAG_EVENT_BUBBLE);
	lv_obj_set_scrollbar_mode(cont, LV_SCROLLBAR_MODE_OFF);
	lv_obj_set_style_radius(cont, lv_dpx(0), 0);

	return cont;
}